<?php
 
$queryString = isset($_REQUEST["q"]) ? $_REQUEST["q"] : '';
if( $queryString == "" || $queryString.length > 140){
    exit;
}

// dobim xml search.atom
// // rpp: Optional. The number of tweets to return per page, up to a max of 100. HARDCODED 10 = OLD SCHOOLz!
$atom = file_get_contents("http://search.twitter.com/search.atom?q=" . urlencode($queryString) . "&rpp=10");
echo $atom;

?>
